//别动这个文件
const baseURL = "https://wwyy.wzhxlx.com/wwyy"
export function request(options){
  wx.showLoading({
    title: '加载中',
  })
  return new Promise((resolve,reject)=>{
    wx.request({
      url: baseURL + options.url,
      data:options.data || {},
      method:options.method || 'get',
      success:res=>{
        resolve(res)
      },
      fail:err=>{
        reject(err)
      },
      complete:() => {
         wx.hideLoading()
      }
    })
  })
}